package cn.xiaohuodui.rest;

import cn.xiaohuodui.exceptions.BussException;
import cn.xiaohuodui.res.JsonRes;
import cn.xiaohuodui.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by TR on 2018/3/30.
 */
@RestController
@RequestMapping("/wx/home")
public class HomeApi {

    @Autowired
    HomeService homeService;

    @RequestMapping(value = "index")
    public JsonRes<Map<String,Object>> getHomeData() throws BussException {
        return  homeService.getHomeData();
    }
}
